package com.punai.monthanalysis.constants;

import com.punai.monthanalysis.domain.ProYdcbfxRgfdbfxb;
import com.punai.monthanalysis.service.*;

public class YdcbfxConstants {

    public enum TABS_TYPE {
        GC_JD_CB_KH_SJ_FXB("gcjdcbkhsjfxb","工程阶段成本考核数据分析表", IProYdcbfxGcjdcbkhsjfxbService.class,""),
        CBDZD("cbdzd","成本对账单", IProYdcbfxCbdzdService.class,""),
        GC_JD_KH_RGF_DB_FXB("gcjdkhrgfdbfxb","工程阶段考核人工费对比分析表", IProYdcbfxGcjdkhrgfdbfxbService.class,"1"),
        GC_JD_KH_CL_DB_FXB("gcjdkhcldbfxb","工程阶段考核材料对比分析表", IProYdcbfxGcjdkhcldbfxbService.class,"2"),
        RGF_DB_FXB("rgfdbfxb","人工费对比分析表", IProYdcbfxRgfdbfxbService.class,"1"),
        ZYFB_GC_DB_FXB("zyfbgcdbfxb","专业分包工程对比分析表", IProYdcbfxZyfbgcdbfxbService.class,"8"),
        DWGC_RGF_ZLDTKZB("dwgcrgfzldtkzb","单位工程人工费总量动态控制表", IProYdcbfxDwgcrgfzldtkzbService.class,"1"),
        DWGC_CSF_FXB("dwgccsffxb","单位工程措施费分析表",IProYdcbfxDwgccsffxbService.class,"13"),
        CLZLKZQKB("clzlkzqkb","材料总量控制情况表",IProYdcbfxClzlkzqkbService.class,"2"),
        ;

        private String code;
        private String desc;
        private String feeType;
        // 执行器
        private Class<? extends ProYdcbfxTabsService> actuator;

        TABS_TYPE(String code,String desc,Class<? extends ProYdcbfxTabsService> actuator,String feeType) {
            this.code = code;
            this.desc = desc;
            this.actuator = actuator;
            this.feeType = feeType;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public Class<? extends ProYdcbfxTabsService> getActuator() {
            return actuator;
        }

        public void setActuator(Class<? extends ProYdcbfxTabsService> actuator) {
            this.actuator = actuator;
        }

        public String getFeeType() {
            return feeType;
        }

        public void setFeeType(String feeType) {
            this.feeType = feeType;
        }

        public static Class<? extends ProYdcbfxTabsService> getActuator(String type) {
            for (TABS_TYPE value : values()) {
                if (value.getCode().equals(type)) {
                    return value.getActuator();
                }
            }
            return ProYdcbfxTabsService.class;
        }

        public static String getFeeType(String code){
            for (TABS_TYPE value : values()) {
                if (value.getCode().equals(code)){
                    return value.getFeeType();
                }
            }
            return null;
        }

    }

    /**
     * @see ProYdcbfxRgfdbfxb#getDatatype()
     */
    public enum TABS_RGFDBFXB_DATATYPE {
        RGFDBFXB_DATATYPE_1("1","实体人工费小计"),
        RGFDBFXB_DATATYPE_2("2","措施人工费小计"),
        RGFDBFXB_DATATYPE_3("3","费用走人工费小计")
        ;

        private String dataType;
        private String desc;

        TABS_RGFDBFXB_DATATYPE(String dataType,String desc) {
            this.dataType = dataType;
            this.desc = desc;
        }

        public String getDataType() {
            return dataType;
        }

        public void setDataType(String dataType) {
            this.dataType = dataType;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public static String getDescByDataType(String dataType) {
            for (TABS_RGFDBFXB_DATATYPE value : values()) {
                if (value.getDataType().equals(dataType)) {
                    return value.getDesc();
                }
            }
            return "";
        }

    }

    /**
     * CBS 土建专业
     */
    public static final String TJ_ZY = "TJ";
    /**
     * 人工费
     */
    public static final String TJ_ZY_RGF_CBSID = "492190530000004";
    /**
     * 材料费
     */
    public static final String TJ_ZY_CLF_CBSID = "492190530001114";
    /**
     * 机械费
     */
    public static final String TJ_ZY_JXF_CBSID = "492190531000070";
    /**
     * 其他直接费
     */
    public static final String TJ_ZY_QTZJF_CBSID = "492190531000079";
    /**
     * 间接费
     */
    public static final String TJ_ZY_JJF_CBSID = "492190724007791";
    /**
     * 财务费用
     */
    public static final String TJ_ZY_CWFY_CBSID = "492190531000084";
    /**
     * 综合费用
     */
    public static final String TJ_ZY_ZHFY_CBSID = "492190708000001";
    /**
     * 税金
     */
    public static final String TJ_ZY_SJ_CBSID = "492190708000002";
    /**
     * 专业分包费
     */
    public static final String TJ_ZY_ZYFBF_CBSID = "492191203002046";

    /**
     * 月度成本分析报表 第一张表(工程阶段成本考核数据分析表)列项
     */
    public enum CBKH_SJ_FXB{
        NAME1("合计"),
        NAME2("劳务分包"),
        NAME3("专业分包"),
        NAME4("材料费"),
        NAME5("周转材料费(预算对应)"),
        NAME6("机械费"),
        NAME7("周转材料费(施工方案)"),
        NAME8("大型机械费"),
        NAME9("安全文明施工费"),
        NAME10("临时设施费"),
        NAME11("其他措施费"),
        NAME12("规费"),
        NAME13("管理费"),
        NAME14("其他费用"),
        NAME15("未对应收入"),
        NAME16("利润及其他"),
        NAME17("不含税合计"),
        NAME18("进项税合计"),
        NAME19("税金合计"),
//        NAME20("增值税销项税"),
//        NAME21("附加税"),
//        NAME22("进项税抵扣"),
        NAME23("收入下浮金额"),
        NAME24("其他")
        ;

        private String name;

        CBKH_SJ_FXB(String name) {
            this.name = name;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }














}
